CREATE TABLE [dbo].[ReqWork]
(
[Ik_ReqWork] [int] NOT NULL IDENTITY(1, 1),
[Years] [numeric] (4, 0) NOT NULL,
[Period] [varchar] (20) COLLATE Cyrillic_General_CI_AS NULL,
[Ik_upContent] [int] NOT NULL
)
GO
ALTER TABLE [dbo].[ReqWork] ADD CONSTRAINT [ReqWorkYearsCheck] CHECK (([Years]>=(2005) AND [Years]<=(2030)))
GO
ALTER TABLE [dbo].[ReqWork] ADD CONSTRAINT [ReqWorkPrimary] PRIMARY KEY CLUSTERED  ([Ik_ReqWork])
GO
CREATE NONCLUSTERED INDEX [idx_Ik_ReqWork] ON [dbo].[ReqWork] ([Ik_ReqWork])
GO
ALTER TABLE [dbo].[ReqWork] ADD CONSTRAINT [ReqWorkCUPlanForeign] FOREIGN KEY ([Ik_upContent]) REFERENCES [dbo].[Content_UchPl] ([ik_upContent])
GO
